package config

type eastmoneyConfig struct {
	flag          bool
	Name          string
	StartUrl      string
	HttpHead      map[string]string
	RequestNum    int
	RequestMethod string
}

var EastmoneyConfig = &eastmoneyConfig{flag: true}

func InitConfig() {
	if EastmoneyConfig.flag == false {
		return
	}
	EastmoneyConfig.HttpHead = make(map[string]string)
	if EastmoneyConfig.Name == "" {
		EastmoneyConfig.Name = "aqie"
	}
	if EastmoneyConfig.RequestNum == 0 {
		EastmoneyConfig.RequestNum = 50
	}
	if EastmoneyConfig.RequestMethod == "" {
		EastmoneyConfig.RequestMethod = "GET"
	}
	EastmoneyConfig.flag = true
}
